<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"	
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{accPostingTransBean.id}"/>
		<f:event type="preRenderView" listener="#{accPostingTransBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Acc Posting Trans"/>

	<ui:define name="header">
		Acc Posting Trans
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty accPostingTransBean.id}">
				Edit existing Acc Posting Trans
			</c:when>
			<c:otherwise>
				Create a new Acc Posting Trans
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="accPostingTransBeanAccPostingTransPostingNo" value="Posting No:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransPostingNo" required="true" value="#{accPostingTransBean.accPostingTrans.postingNo}"/>
					<h:message for="accPostingTransBeanAccPostingTransPostingNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransOrgNo" value="Org No:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransOrgNo" value="#{accPostingTransBean.accPostingTrans.orgNo}"/>
					<h:message for="accPostingTransBeanAccPostingTransOrgNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransStartAccTransDate" value="Start Acc Trans Date:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransStartAccTransDate" maxLength="10" value="#{accPostingTransBean.accPostingTrans.startAccTransDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="accPostingTransBeanAccPostingTransStartAccTransDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransEndAccTransDate" value="End Acc Trans Date:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransEndAccTransDate" maxLength="10" value="#{accPostingTransBean.accPostingTrans.endAccTransDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="accPostingTransBeanAccPostingTransEndAccTransDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransPostingDtm" value="Posting Dtm:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransPostingDtm" maxLength="19" value="#{accPostingTransBean.accPostingTrans.postingDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="accPostingTransBeanAccPostingTransPostingDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransPostingByUserNo" value="Posting By User No:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransPostingByUserNo" value="#{accPostingTransBean.accPostingTrans.postingByUserNo}"/>
					<h:message for="accPostingTransBeanAccPostingTransPostingByUserNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransPostingStatusNo" value="Posting Status No:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransPostingStatusNo" value="#{accPostingTransBean.accPostingTrans.postingStatusNo}"/>
					<h:message for="accPostingTransBeanAccPostingTransPostingStatusNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransPostingMemo" value="Posting Memo:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransPostingMemo" maxLength="500" value="#{accPostingTransBean.accPostingTrans.postingMemo}"/>
					<h:message for="accPostingTransBeanAccPostingTransPostingMemo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="accPostingTransBeanAccPostingTransPostingRetMsg" value="Posting Ret Msg:"/>
				<h:panelGroup>
					<h:inputText id="accPostingTransBeanAccPostingTransPostingRetMsg" maxLength="500" value="#{accPostingTransBean.accPostingTrans.postingRetMsg}"/>
					<h:message for="accPostingTransBeanAccPostingTransPostingRetMsg" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{accPostingTransBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty accPostingTransBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{accPostingTransBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{accPostingTransBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>